package com.cj.webapp.account.service;

import com.cj.webapp.account.pojo.LoginEnterpriseDto;
import com.cj.webapp.account.pojo.LoginPersonDto;
import com.cj.webapp.common.utils.BeanUtil;
import com.cj.webapp.common.utils.http.HttpsUtil;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by dell on 2018/1/12.
 */
public class AccountEnterpriseServiceImpl {

    private HttpsUtil httpsUtil=new HttpsUtil();
    /**
     * 企业开户信息
     * @param enterpriseDto
     * @return
     */
    public String getMemberAccount(LoginEnterpriseDto enterpriseDto, String urlString){
        String result=null;
        Map<String ,Object> map=new HashMap<>();
        if(enterpriseDto!=null){
            map= BeanUtil.beanToMap(enterpriseDto);
            result=httpsUtil.sendEnterPrisePub(map,urlString);
        }
        return result;
    }
    public String getTokenString(LoginEnterpriseDto enterpriseDto, String urlString){
        String tokey=null;
        Map<String ,Object> map=new HashMap<>();
        if(enterpriseDto!=null){
            map=BeanUtil.beanToMap(enterpriseDto);
            tokey=httpsUtil.sendToken(map,urlString);
        }
        return tokey;
    }

}
